STATS 21 Spring 2025 Syllabus

grading + due dates may change due to current events

Author

Vivian Lew, PhD

Published

March 7, 2025

Introduction

This class covers using Python and other technologies for data analysis and data science. We will focus on programming with Python and a selection of its libraries: NumPy, Pandas, Matplotlib, and others for the purpose of data processing, data cleaning, data analysis, etc. Other technologies covered will include Quarto, VSCode, Jupyter, and Git. This course is intended for Data Theory majors as an introduction to the Python language and libraries most frequently used in data science. No prior experience with Python is assumed.

Course Information More Information
Instructor: Vivian Lew Office: Math Sciences 8923
Contact Info:
Please e-mail through BruinLearn
Office Hours: W 2:00pm-5:00pm (my office)
and you are always welcome to schedule appointment(s), evenings & weekends too
Meeting Times and Locations:
MW 2:00pm-3:15pm (Lect 1 - Math Sciences 4000A)
TAs: Joseph Resch (1A 8am, 1B 9am)
and Lan Tao (1C 8am, 1D 9am)
Section location Mathematical Sciences 5128 (1A, 1B)
Physics and Astronomy Building 1749 (1C, 1D)
Office Hours TBD

Proposed Learning Outcomes

Upon completion of this course, students:

  • will be comfortable with some of the software tools associated with Python
  • will be able to read, write, and improve intermediate level code in Python
  • will be able to create, load, transform, and analyze data with Python
  • will be able to create and publish data visualizations in Python

Grades

Letter grades are assigned on a straight scale as follows:

  • 50% and below: F
  • 51.0 - 76.9%: C, 77.0 - 79.9%: C+
  • 80.0 - 82.9%: B-, 83.0 - 86.9%: B, 87.0 - 89.9%: B+
  • 90.0 - 92.9%: A-, 93.0% and up A

I do not assign C-, D+, D, or D-. If you are a Data Theory major please take the class for a letter grade. Taking the course pass/no-pass will not fulfill the requirements for completing the major.

Class attendance and participation

The learning process of this class is based on in-person discussion and participation during lecture and attending and participating during discussion section with your TAs. The lecture is not broadcast (please check with your TA about section) instead a weekly recorded recap lecture will be uploaded to BruinLearn. If you are unable to attend lecture in person because you have a documented accommodation with UCLA, please let me know via e-mail sent from BruinLearn so we can work out a different arrangement.

Grading

  • 20% Attending and participating in team activities during lecture
  • 10% Attending and participating during section (TA will determine the specifics)
  • 10% End of quarter project for TA/discussion (TA will determine the specifics)
  • 20% Python Homework (6 assignments - drop your lowest score)
  • 15% Python journal pages (upload 3x per week - drop 3 lowest)
  • 10% Python Teaching Video (due by the end of the quarter)
  • 15% Final exam (in-person only, bring a pencil, no electronic devices allowed and no internet access)

Course Grade Changes

After course grades have been submitted to the registrar, grades are final. Grade changes will only be considered if there has been a clerical or procedural mistake. Students have one quarter to make requests for a grade change. Graded exams and other materials are kept for one quarter. After one quarter, course grade changes cannot be made.

Course Materials

All course related materials are posted to BruinLearn, all assignments are uploaded to that site as well typically in the form of PDF files, photographs or recordings. Official course grades are found online on myUCLA only. Other materials:

The two texts are available free via access with UCLA’s library to O’Reilly.

Suggested Tech for this course

  • Python 3.13 minor version differences (e.g., 3.11, 3.12, 3.14) are fine.
  • Quarto, or JupyterLab, or Google Colab.
  • pip (visit ChatGPT and ask it something like ‘How can I check if I have pip installed on my computer?’) or Anaconda
  • VS Code you need some kind of source editor but Jupyter & Colab are perfectly acceptable
  • A GitHub account (free) if you do not already have one and you should consider it (not required) also download and install git on your local computer

Posting Policy

All course materials posted on the course website or distributed in class (including but not limited to lecture slides, homework assignments, lecture videos, quizzes, exams) are intended for personal use only by students enrolled in Stats 21 Lecture 1. It is a violation of course policy to post, share, or distribute any course material electronically or physically without permission from the instructor, even after the course is over.

Course Outline (this is subject to change)

Date Topic (T ; Th)
Week 1 4/1 & 4/3 First Day business, Tech Checklist; base Python I
Week 2 4/8 & 4/10 base Python II; writing functions, working with data
Week 3 4/15 & 4/17 Object-Oriented Programming Classes and objects, methods, inheritance
Week 4 4/22 & 4/24 NumPy: Arrays, Broadcasting, Vectorization, Indexing, Math Functions
Week 5 4/29 & 5/1 Pandas: DataFrames, Filtering, GroupBy, Aggregation, Handling Missing Data
Week 6 5/6 & 5/8 Pandas: More Pandas
Week 7 5/13 & 5/15 Matplotlib & Seaborn
Week 8 5/20 & 5/22 SciPy & Scikit-learn
Week 9 5/27 & 5/29 some SQL
Week 10 6/3 & 6/5 TBD; Review for Final Exam
Final 6/11 Wednesday June 11, 12:00pm - 1:30pm

Academic Dishonesty

As Bruins, we uphold the UCLA Student Code of Conduct. Academic dishonesty means activities like plagiarism, unauthorized material used on exams, unauthorized collaborations etc. According to Senate Regulation A-306, if an instructor encounters a problem, the instructor is required to report it to the Dean of Students.

AI policy

Your instructor’s belief is AI should be used – wisely – as if it were an amazingly clever tutor or friend. But copying and pasting the code is not learning and chances are, you will not retain the skill (this is the greater concern). Writing well crafted AI prompts with the goal of developing correct scaffolding of programming skills will help you retain the knowledge long after this course is over.

Accessible Education

Students with accessibility issues are welcome and encouraged to seek accommodation. Students needing academic accommodations based on a documented disability should contact the Center for Accessible Education (CAE) at (310)825-1501 or in person at Murphy Hall A255. In order to ensure accommodations, students need to contact CAE within the first two weeks of the term.

Plan for the Unexpected

Question Response
How will our class meet if we are unable to meet in person? If we are unable to meet on campus for class, there will be an announcement on BruinLearn about how we will be meeting going forward.
How will instruction be delivered if we are unable to meet in person? In lieu of in-person meetings, we will hold online meetings using Zoom and post a mix of videos on BruinLearn, covering the content. In order to ensure accountability we will embed quizzes within the videos and require participation for credit if you are unable to attend live online.
How often do I need to login to BruinLearn? It is expected that you visit the course site daily. If we experience an emergency or if there is another wave of the pandemic, you are expected to participate in the online activities for as long as we are unable to meet on campus.
How will I turn in my homework if we don’t meet in person? Homework and other assignments will be turned in through the assignments link within BruinLearn. Instructions for submission can be found within the assignment.
How will I take my exams? In an emergency, exams will be delivered through BruinLearn. It is expected that you will not collaborate with others on exams unless it is allowed. Please see the academic integrity section of the syllabus for details about what is considered cheating and the associated consequences.
How will I see my Grades? All official grades are posted on MyUCLA. BruinLearn posted grades are subject to change.
If I am ill or cannot attend class for some reason, how can I participate in class? Please contact me directly for more details if you must be absent or have changing situations so that I can understand how we can best help you.
What if I’m experiencing symptoms, tested positive, or have had contact with a person who has tested positive for COVID-19? Please stay home and do not return to campus or leave your on-campus residence. Complete a Reporting COVID-19 Diagnosis/Symptom form. The Campus Health Officer will follow up with you for next steps. If applicable, the Campus Health Officer will notify faculty members that the student is prohibited from returning to campus until they are cleared by Health Services. Please review UCLA’s COVID-19 protocols https://covid-19.ucla.edu/ucla-covid-protocols/.
What if I’m having personal problems unrelated to illness? Where can I go for help? There are resources listed throughout this document and you are also encouraged to speak, privately, with your professor(s), your TA, or department advisors during your time of difficulty.

COVID-19 health and safety

In compliance with Los Angeles County policies effective January 6 2023, UCLA strongly recommends indoor masking, regardless of vaccination status. Testing is also strongly encouraged. See

Some of us might feel more comfortable wearing masks and continuing to social distance, for example, during small-group work in class or section. All of our preferences are reasonable, and it is important that we treat each others’ preferences with respect and care so that we each feel comfortable and prepared to learn in class. You can find the most current policies on campus requirements on the UCLA COVID-19 resources site https://covid-19.ucla.edu/.

Psychological Health, Well-Being and Resilience

UCLA is renowned for academic excellence, and yet we know that many students feel overwhelmed at times by demands to succeed academically, socially and personally. Our campus community is committed to helping all students thrive, learn to cope with stress, and build resilience. Remember, self-care is a skill that is critical to your long-term success. Here are some of the many resources available at UCLA to support you:

  • Counseling and Psychological Services (CAPS): Provides counseling and other psychological/mental health services to students. Walk-in hours are Monday-Thursday 8am-4:30pm and Friday 9am-4:30pm in John Wooden Center West. Crisis counseling is also available 24 hours/day at (310) 825-0768.

  • Ashe Student Health and Wellness Center: Provides high quality and accessible ambulatory healthcare and education by caring professionals to support the academic success and personal development of all UCLA students.

  • Healthy Campus Initiative (HCI): Provides links to a wide variety of resources for enhancing physical and psychological well-being, positive social interactions, healthy sleep, healthy eating, healthy physical activity and more.

  • Campus and Student Resilience: Provides programs to promote resilience and trains students to help support their peers.

  • UCLA Recreation: Offers a broad array of services and programs including fitness, yoga, dance, martial arts, meditation, sports, and much more.

  • Equity, Diversity and Inclusion: Committed to providing an equal learning, working and living environment at UCLA and supports a range of programs to promote these goals campus-wide.

Resources for Students Dealing with Financial Stress

Life is unpredictable and can create financial emergencies. If you find yourself in this situation, please seek assistance:

  • Bruin Shelter: Provides a safe, supportive environment for fellow college students experiencing homelessness by fostering a collaborative effort between universities, community-based organizations, and service providers.

  • The CPO Food Shelter: Provides free food for any UCLA student who may be experiencing hunger and/or struggling to attain food due to financial hardships.

Title IX Resources

UCLA prohibits gender discrimination, including sexual harassment, domestic and dating violence, sexual assault, and stalking. If you have experienced sexual harassment or sexual violence, there are a variety of resources to assist you.

  • CONFIDENTIAL RESOURCES: You can receive confidential support and advocacy at the CARE Advocacy Office for Sexual and Gender-Based Violence, 1st Floor Wooden Center West, (310) 206-2465. Counseling and Psychological Services (CAPS) also provides confidential counseling to all students and can be reached 24/7 at (310) 825-0768.

  • NON-CONFIDENTIAL RESOURCES: You can also report sexual violence or sexual harassment directly to the University’s Title IX Coordinator, 2241 Murphy Hall, titleix@conet.ucla.edu, (310) 206-3417. Reports to law enforcement can be made to UCPD at (310) 825-1491. These offices may be required to pursue an official investigation.